import request from '@/utils/request'

const bossApi = {
  serviceDetail(data) { //常
    return request({
      url: `/b2b/company-center/service-permission/detail/`+data.imListId+`/`+data.code,
      method: 'get'
    })
  },
    // 新增员工账号信息-验证手机号
    getVipInfo(data) {
      return request({
        url:`/webinar/newapi/login/getVipInfo`,
        method: 'get',
        params: data
      })
    },
  // 新增员工账号信息
  addAccountInfo(data) {
    return request({
      url:`/b2b/company-center/`+ data.pathurl+`/addAccountInfo`,
      method: 'post',
      data
    })
  },
  // 查询厂商角色列表
  queryAccountRoleList(data) {
    return request({
      url: data.pathurl+`/queryAccountRoleList`,
      method: 'get',
      params: data
    })
  },
  // 查询员工账号列表
  queryAccountList(data) {
    return request({
      url:`/b2b/company-center/`+ data.pathurl+`/queryAccountList`,
      method: 'get',
      params: data
    })
  },
  //  编辑员工账号信息
  updateAccountInfo(data) {
    console.log(data);
    return request({
      url: `/b2b/company-center/`+data.pathurl+`/updateAccountInfo`,
      method: 'post',
      data
    })
  },
  // 启用停用员工账号
  enableAccountInfo(data) {
    return request({
      url:`/b2b/company-center/`+ data.pathurl+`/enableAccountInfo`,
      method: 'get',
      params: data
    })
  },
  // 查询当前厂商的绑定账号数
  getCompanyUserCount(data) {
    return request({
      url: `/b2b/company-center/PtBoss/getCompanyUserCount`,
      method: 'get',
      params: data
    })
  },
  // 查询厂商角色权限列表
  queryRoleAuthList(data) {
    return request({
      url: `/b2b/company-center/PtBoss/queryRoleAuthList`,
      method: 'get',
      params: data
    })
  },
  // 新增或者编号角色信息
  saveRoleInfo(data) {
    return request({
      url: `/b2b/company-center/PtBoss/saveRoleInfo`,
      method: 'post',
      data
    })
  },
  // 查询所有角色权限列表
  getAllRoleAuthList(data) {
    return request({
      url: `/b2b/company-center/PtBoss/getAllRoleAuthList`,
      method: 'get',
      params: data
    })
  },
  // 修改超级管理员手机号
  updateSuperBossMobile(data) {
    return request({
      url: `/b2b/company-center/PtBoss/updateSuperBossMobile`,
      method: 'post',
      data
    })
  },
  // 根据用户查询 详情
  getCompanyUserDetail(data) {
    return request({
      url:data.pathurl+`/getCompanyUserDetail`,
      method: 'get',
      params: data
    })
  },
  // 删除员工账号信息
  delAccountInfo(data) {
    return request({
      url:`/b2b/company-center/`+data.pathurl+`/delAccountInfo`,
      method: 'get',
      params: data
    })
  },
  // 删除角色账号信息
  delRoleInfo(data) {
    return request({
      url: `/b2b/company-center/PtBoss/delRoleInfo`,
      method: 'get',
      params: data
    })
  },
  // 用户绑定厂商
  userBindCompany(data) {
    return request({
      url: `/b2b/company-center/PtBoss/userBindCompany`,
      method: 'get',
      params: data
    })
  },
  // 修改手机号
  updateUserInfoMobile(data) {
    return request({
      url: `/b2b/company-center/PtBoss/updateUserInfoMobile`,
      method: 'post',
      data
    })
  },
  // 查询用户的厂商列表
  getCompanyListByUserInfo(data) {
    return request({
      url: `/b2b/company-center/PtBoss/getCompanyListByUserInfo`,
      method: 'get',
      params: data
    })
  },
  // 设置默认展位
  setDefaultCompany(data) {
    return request({
      url: `/b2b/company-center/PtBoss/setDefaultCompany`,
      method: 'get',
      params: data
    })
  },
  // 解除绑定信息
  removeBind(data) {
    return request({
      url: `/b2b/company-center/PtBoss/removeBind`,
      method: 'get',
      params: data
    })
  },
  // checkValidTest
  checkValidTest(data) {
    return request({
      url: `/b2b/company-center/PtBoss/checkValidTest`,
      method: 'get',
      params: data
    })
  }
}
export default bossApi
